using System;
using System.Globalization;
using DotNetNuke.Framework;
using HeroldIT.Dnn.JQuery.UI;

namespace HeroldIT.Dnn.Modules.News.DefaultViews
{
    public partial class List : Views.NewsList
    {
        protected override void OnLoad(EventArgs e)
        {
            string languageName = ((PageBase)this.Page).PageCulture.TwoLetterISOLanguageName;
            DatePicker dpFrom = (DatePicker)this.txtFrom;
            dpFrom.MaxDate = DateTime.Now;
            dpFrom.Locale = languageName;
            DatePicker dpUntil = (DatePicker)this.txtUntil;
            dpUntil.MaxDate = DateTime.Now;
            dpUntil.Locale = languageName;
            base.OnLoad(e);
        }
    }
}